package com.luweijie.mappre;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.luweijie.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;


@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("select * FROM `user` where username=#{username}")
    User loadUserByUsername(String username);
    @Select("select role from user where id=#{id}")
    String getUserRolesById(Integer id);
}